<!--
 * @Author: your name
 * @Date: 2021-08-04 14:10:34
 * @LastEditTime: 2021-08-04 18:50:28
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\3-html&css\day03\1-table.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>table</title>
</head>
<body>
    <div>
        <table align="center">
            
           <!--caption 作为table的子元素，表示表格的标题信息 -->
            <caption>
                <h3>名单</h3>
            </caption>
            
            <!-- colgroup 列分组，定义一个表中的一组列，作为table的子元素，同时放在caption标题标签的后面，其他元素的前面 -->
            <!-- col:经常作为colgroup的子元素，有span属性，即规定几列为同意一列，样式相同 -->
            <colgroup>
                <col  span="2" style="background-color: rgb(71, 243, 255);">
                <col style="background-color: rgb(120, 71, 255);">
                <col style="background-color: rgb(102, 255, 71);">
            </colgroup>
            <tr>
                <th>姓名</th>
                <th>性别</th>
                <th>年龄</th>
            </tr>
            <tr>
                <td>larry</td>
                <td>男</td>
                <td>28</td>
            </tr>
            <tr>
                <td>terry</td>
                <td>男</td>
                <td>21</td>
            </tr>
        </table>
    </div>
</body>
</html>